package com.dsg.config;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.multipart.commons.CommonsMultipartResolver;

/**
 * @program: erp
 * @description:
 * @author: lironglai
 * @create: 2020-07-07 19:08
 */
@Configuration
public class MultipartConfig {
    @Bean(name = "multipartResolver")
    public CommonsMultipartResolver getCommonsMultipartResolver() {
        CommonsMultipartResolver multipartResolver = new CommonsMultipartResolver();
        multipartResolver.setMaxUploadSize(209715200);
        multipartResolver.setMaxInMemorySize(1048576);
        return multipartResolver;
    }
}
